/**
 * Created by waterworld on 17-7-21.
 */
/**
 * Created by waterworld qq 115245155 on 17-5-23.
 */

/**
 * Created by waterworld on 17-2-27.
 */

var struct=function(){
    var obj=new Object();
    var CardType={FANG_KUAI:1, MEI_HUA:2, HONG_TAO:3, HEI_TAO:4, XIAO_WANG:5, DA_WANG:6};
    obj.CardType=CardType;
    var  cardsType={BAO_ZI:6,		//豹子
        SHUN_JIN:5,	//顺金
        JIN_HUA:4,		//金花
        SHUN_ZI:3,		//顺子
        DUI_ZI:2,		//对子
        DAN_ZHANG:1,	//单张
        ER_3_5:0,	//235
        mutiple:{
            BAO_ZI:10, //喜钱倍数
            SHUN_JIN:5,
            JIN_HUA:0,
            SHUN_ZI:0,
            DUI_ZI:0,
            DAN_ZHANG:0,
            ER_3_5:0,
        }
    }
    obj.cardsType=cardsType;
    obj.Card1=function(){ var list= [
        /*
         * 方块 A - K,0-12
         */
        /*
         * 方块 A - K,0-12
         */
        {name:'FA',id:0,cid:3,power:14, num:1,dian:1,type:CardType.FANG_KUAI},
        {name:'F2',id:1,cid:7,power:2, num:2,dian:2,type:CardType.FANG_KUAI},
        {name:'F3',id:2,cid:11,power:3, num:3,dian:3,type:CardType.FANG_KUAI},
        {name:'F4',id:3,cid:15,power:4, num:4,dian:4,type:CardType.FANG_KUAI},
        {name:'F5',id:4,cid:19,power:5, num:5,dian:5,type:CardType.FANG_KUAI},
        {name:'F6',id:5,cid:23,power:6, num:6,dian:6,type:CardType.FANG_KUAI},
        {name:'F7',id:6,cid:27,power:7, num:7,dian:7,type:CardType.FANG_KUAI},
        {name:'F8',id:7,cid:31,power:8, num:8,dian:8,type:CardType.FANG_KUAI},
        {name:'F9',id:8,cid:35,power:9, num:9,dian:9,type:CardType.FANG_KUAI},
        {name:'F10',id:9,cid:39,power:10, num:10,dian:10,type:CardType.FANG_KUAI},
        {name:'FJ',id:10,cid:43,power:11, num:11,dian:0.5,type:CardType.FANG_KUAI},
        {name:'FQ',id:11,cid:47,power:12, num:12,dian:0.5,type:CardType.FANG_KUAI},
        {name:'FK',id:12,cid:51,power:13, num:13,dian:0.5,type:CardType.FANG_KUAI},

        /*
         * 梅花 A - K,13-25
         */
        {name:'MA',id:13,cid:2,power:14, num:1,dian:1,type:CardType.MEI_HUA},
        {name:'M2',id:14,cid:6,power:2, num:2,dian:2,type:CardType.MEI_HUA},
        {name:'M3',id:15,cid:10,power:3, num:3,dian:3,type:CardType.MEI_HUA},
        {name:'M4',id:16,cid:14,power:4, num:4,dian:4,type:CardType.MEI_HUA},
        {name:'M5',id:17,cid:18,power:5, num:5,dian:5,type:CardType.MEI_HUA},
        {name:'M6',id:18,cid:22,power:6, num:6,dian:6,type:CardType.MEI_HUA},
        {name:'M7',id:19,cid:26,power:7, num:7,dian:7,type:CardType.MEI_HUA},
        {name:'M8',id:20,cid:30,power:8, num:8,dian:8,type:CardType.MEI_HUA},
        {name:'M9',id:21,cid:34,power:9, num:9,dian:9,type:CardType.MEI_HUA},
        {name:'M10',id:22,cid:38,power:10, num:10,dian:10,type:CardType.MEI_HUA},
        {name:'MJ',id:23,cid:42,power:11, num:11,dian:0.5,type:CardType.MEI_HUA},
        {name:'MQ',id:24,cid:46,power:12, num:12,dian:0.5,type:CardType.MEI_HUA},
        {name:'MK',id:25,cid:50,power:13, num:13,dian:0.5,type:CardType.MEI_HUA},

        /*
         * 红桃 A - K，26-38
         */
        {name:'HONGA',id:26,cid:1,power:14, num:1,dian:1,type:CardType.HONG_TAO},
        {name:'HONG2',id:27,cid:5,power:2, num:2,dian:2,type:CardType.HONG_TAO},
        {name:'HONG3',id:28,cid:9,power:3, num:3,dian:3,type:CardType.HONG_TAO},
        {name:'HONG4',id:29,cid:13,power:4, num:4,dian:4,type:CardType.HONG_TAO},
        {name:'HONG5',id:30,cid:17,power:5, num:5,dian:5,type:CardType.HONG_TAO},
        {name:'HONG6',id:31,cid:21,power:6, num:6,dian:6,type:CardType.HONG_TAO},
        {name:'HONG7',id:32,cid:25,power:7, num:7,dian:7,type:CardType.HONG_TAO},
        {name:'HONG8',id:33,cid:29,power:8, num:8,dian:8,type:CardType.HONG_TAO},
        {name:'HONG9',id:34,cid:33,power:9, num:9,dian:9,type:CardType.HONG_TAO},
        {name:'HONG10',id:35,cid:37,power:10, num:10,dian:10,type:CardType.HONG_TAO},
        {name:'HONGJ',id:36,cid:41,power:11, num:11,dian:0.5,type:CardType.HONG_TAO},
        {name:'HONGQ',id:37,cid:45,power:12, num:12,dian:0.5,type:CardType.HONG_TAO},
        {name:'HONGK',id:38,cid:49,power:13, num:13,dian:0.5,type:CardType.HONG_TAO},

        //黑桃 A - K,39-51
        {name:'HEIA',id:39,cid:0,power:14, num:1,dian:1,type:CardType.HEI_TAO},
        {name:'HEI2',id:40,cid:4,power:2, num:2,dian:2,type:CardType.HEI_TAO},
        {name:'HEI3',id:41,cid:8,power:3, num:3,dian:3,type:CardType.HEI_TAO},
        {name:'HEI4',id:42,cid:12,power:4, num:4,dian:4,type:CardType.HEI_TAO},
        {name:'HEI5',id:43,cid:16,power:5, num:5,dian:5,type:CardType.HEI_TAO},
        {name:'HEI6',id:44,cid:20,power:6, num:6,dian:6,type:CardType.HEI_TAO},
        {name:'HEI7',id:45,cid:24,power:7, num:7,dian:7,type:CardType.HEI_TAO},
        {name:'HEI8',id:46,cid:28,power:8, num:8,dian:8,type:CardType.HEI_TAO},
        {name:'HEI9',id:47,cid:32,power:9, num:9,dian:9,type:CardType.HEI_TAO},
        {name:'HEI10',id:48,cid:36,power:10, num:10,dian:10,type:CardType.HEI_TAO},
        {name:'HEIJ',id:49,cid:40,power:11, num:11,dian:0.5,type:CardType.HEI_TAO},
        {name:'HEIQ',id:50,cid:44,power:12, num:12,dian:0.5,type:CardType.HEI_TAO},
        {name:'HEIK',id:51,cid:48,power:13, num:13,dian:0.5,type:CardType.HEI_TAO},
        /*
         * 小王,大王 52,53
         */
        {name:'XIAO_WANG',id:52,cid:53,power:16, num:1,dian:0.5,type:CardType.XIAO_WANG},
        {name:'DA_WANG',id:53,cid:54,power:17, num:1,dian:0.5,type:CardType.DA_WANG},
    ];
        var len=list.length;
        for(var i=0;i<len;i++)
        {  var it=list[i];
            it.id=i;}

        return list;
    }
    obj.map1={};
    var c1=obj.Card1();
    var len=c1.length;
    for(var i=0;i<len;i++)
    {
        var c=c1[i];
        obj.map1[c.name]=c;
    }
    obj.Card2=function(){ var list= [
        /*
         * 方块 A - K,0-12
         */
        {name:'FA',id:0,cid:3,power:14, num:1,dian:1,type:CardType.FANG_KUAI},
        {name:'F2',id:1,cid:7,power:2, num:2,dian:2,type:CardType.FANG_KUAI},
        {name:'F3',id:2,cid:11,power:3, num:3,dian:3,type:CardType.FANG_KUAI},
        {name:'F4',id:3,cid:15,power:4, num:4,dian:4,type:CardType.FANG_KUAI},
        {name:'F5',id:4,cid:19,power:5, num:5,dian:5,type:CardType.FANG_KUAI},
        {name:'F6',id:5,cid:23,power:6, num:6,dian:6,type:CardType.FANG_KUAI},
        {name:'F7',id:6,cid:27,power:7, num:7,dian:7,type:CardType.FANG_KUAI},
        {name:'F8',id:7,cid:31,power:8, num:8,dian:8,type:CardType.FANG_KUAI},
        {name:'F9',id:8,cid:35,power:9, num:9,dian:9,type:CardType.FANG_KUAI},
        {name:'F10',id:9,cid:39,power:10, num:10,dian:10,type:CardType.FANG_KUAI},
        {name:'FJ',id:10,cid:43,power:11, num:11,dian:0.5,type:CardType.FANG_KUAI},
        {name:'FQ',id:11,cid:47,power:12, num:12,dian:0.5,type:CardType.FANG_KUAI},
        {name:'FK',id:12,cid:51,power:13, num:13,dian:0.5,type:CardType.FANG_KUAI},

        /*
         * 梅花 A - K,13-25
         */
        {name:'MA',id:13,cid:2,power:14, num:1,dian:1,type:CardType.MEI_HUA},
        {name:'M2',id:14,cid:6,power:2, num:2,dian:2,type:CardType.MEI_HUA},
        {name:'M3',id:15,cid:10,power:3, num:3,dian:3,type:CardType.MEI_HUA},
        {name:'M4',id:16,cid:14,power:4, num:4,dian:4,type:CardType.MEI_HUA},
        {name:'M5',id:17,cid:18,power:5, num:5,dian:5,type:CardType.MEI_HUA},
        {name:'M6',id:18,cid:22,power:6, num:6,dian:6,type:CardType.MEI_HUA},
        {name:'M7',id:19,cid:26,power:7, num:7,dian:7,type:CardType.MEI_HUA},
        {name:'M8',id:20,cid:30,power:8, num:8,dian:8,type:CardType.MEI_HUA},
        {name:'M9',id:21,cid:34,power:9, num:9,dian:9,type:CardType.MEI_HUA},
        {name:'M10',id:22,cid:38,power:10, num:10,dian:10,type:CardType.MEI_HUA},
        {name:'MJ',id:23,cid:42,power:11, num:11,dian:0.5,type:CardType.MEI_HUA},
        {name:'MQ',id:24,cid:46,power:12, num:12,dian:0.5,type:CardType.MEI_HUA},
        {name:'MK',id:25,cid:50,power:13, num:13,dian:0.5,type:CardType.MEI_HUA},

        /*
         * 红桃 A - K，26-38
         */
        {name:'HONGA',id:26,cid:1,power:14, num:1,dian:1,type:CardType.HONG_TAO},
        {name:'HONG2',id:27,cid:5,power:2, num:2,dian:2,type:CardType.HONG_TAO},
        {name:'HONG3',id:28,cid:9,power:3, num:3,dian:3,type:CardType.HONG_TAO},
        {name:'HONG4',id:29,cid:13,power:4, num:4,dian:4,type:CardType.HONG_TAO},
        {name:'HONG5',id:30,cid:17,power:5, num:5,dian:5,type:CardType.HONG_TAO},
        {name:'HONG6',id:31,cid:21,power:6, num:6,dian:6,type:CardType.HONG_TAO},
        {name:'HONG7',id:32,cid:25,power:7, num:7,dian:7,type:CardType.HONG_TAO},
        {name:'HONG8',id:33,cid:29,power:8, num:8,dian:8,type:CardType.HONG_TAO},
        {name:'HONG9',id:34,cid:33,power:9, num:9,dian:9,type:CardType.HONG_TAO},
        {name:'HONG10',id:35,cid:37,power:10, num:10,dian:10,type:CardType.HONG_TAO},
        {name:'HONGJ',id:36,cid:41,power:11, num:11,dian:0.5,type:CardType.HONG_TAO},
        {name:'HONGQ',id:37,cid:45,power:12, num:12,dian:0.5,type:CardType.HONG_TAO},
        {name:'HONGK',id:38,cid:49,power:13, num:13,dian:0.5,type:CardType.HONG_TAO},

        //黑桃 A - K,39-51
        {name:'HEIA',id:39,cid:0,power:14, num:1,dian:1,type:CardType.HEI_TAO},
        {name:'HEI2',id:40,cid:4,power:2, num:2,dian:2,type:CardType.HEI_TAO},
        {name:'HEI3',id:41,cid:8,power:3, num:3,dian:3,type:CardType.HEI_TAO},
        {name:'HEI4',id:42,cid:12,power:4, num:4,dian:4,type:CardType.HEI_TAO},
        {name:'HEI5',id:43,cid:16,power:5, num:5,dian:5,type:CardType.HEI_TAO},
        {name:'HEI6',id:44,cid:20,power:6, num:6,dian:6,type:CardType.HEI_TAO},
        {name:'HEI7',id:45,cid:24,power:7, num:7,dian:7,type:CardType.HEI_TAO},
        {name:'HEI8',id:46,cid:28,power:8, num:8,dian:8,type:CardType.HEI_TAO},
        {name:'HEI9',id:47,cid:32,power:9, num:9,dian:9,type:CardType.HEI_TAO},
        {name:'HEI10',id:48,cid:36,power:10, num:10,dian:10,type:CardType.HEI_TAO},
        {name:'HEIJ',id:49,cid:40,power:11, num:11,dian:0.5,type:CardType.HEI_TAO},
        {name:'HEIQ',id:50,cid:44,power:12, num:12,dian:0.5,type:CardType.HEI_TAO},
        {name:'HEIK',id:51,cid:48,power:13, num:13,dian:0.5,type:CardType.HEI_TAO},

        /*
         * 方块 A - K,0-12
         */
        {name:'FA',id:0,cid:3,power:14, num:1,dian:1,type:CardType.FANG_KUAI},
        {name:'F2',id:1,cid:7,power:2, num:2,dian:2,type:CardType.FANG_KUAI},
        {name:'F3',id:2,cid:11,power:3, num:3,dian:3,type:CardType.FANG_KUAI},
        {name:'F4',id:3,cid:15,power:4, num:4,dian:4,type:CardType.FANG_KUAI},
        {name:'F5',id:4,cid:19,power:5, num:5,dian:5,type:CardType.FANG_KUAI},
        {name:'F6',id:5,cid:23,power:6, num:6,dian:6,type:CardType.FANG_KUAI},
        {name:'F7',id:6,cid:27,power:7, num:7,dian:7,type:CardType.FANG_KUAI},
        {name:'F8',id:7,cid:31,power:8, num:8,dian:8,type:CardType.FANG_KUAI},
        {name:'F9',id:8,cid:35,power:9, num:9,dian:9,type:CardType.FANG_KUAI},
        {name:'F10',id:9,cid:39,power:10, num:10,dian:10,type:CardType.FANG_KUAI},
        {name:'FJ',id:10,cid:43,power:11, num:11,dian:0.5,type:CardType.FANG_KUAI},
        {name:'FQ',id:11,cid:47,power:12, num:12,dian:0.5,type:CardType.FANG_KUAI},
        {name:'FK',id:12,cid:51,power:13, num:13,dian:0.5,type:CardType.FANG_KUAI},

        {name:'XIAO_WANG',id:52,cid:53,power:16, num:1,dian:0.5,type:CardType.XIAO_WANG},
        {name:'DA_WANG',id:53,cid:54,power:17, num:1,dian:0.5,type:CardType.DA_WANG},
    ];
        var len=list.length;
        for(var i=0;i<len;i++)
        {  var it=list[i];
            it.id=i;}

        return list;
    }


    return obj;

}


module.exports=struct();

